Carbon


KCLock

Header: Keychain.h Carbon status: Under Evaluation

Locks a keychain.

OSStatus KCLock (
    KCRef keychain
);
keychain

A reference to the keychain to lock. Pass NULL to lock all unlocked keychains.

function result

A result code. The result code errKCNoSuchKeychain indicates that specified keychain could not be found. The result code errKCInvalidKeychain indicates that the specified keychain is invalid.

DISCUSSION

The KCLock function locks a keychain if it is unlocked. Your application should not call KCLock unless you are directly responding to a user's request to lock a keychain. In general, you should leave the keychain unlocked so that the user does not have to unlock it again in another application.

VERSION NOTES

Available beginning with Keychain Manager 1.0. In Keychain Manager 1.0, the kclock function provides the same functionality as KCLock. In Keychain 2.0, you should use KCLock, since kclock is provided for convenience only and may be removed from the header file at some point in the future.

AVAILABILITY

Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)